// Sidebar.js is the parent component of Sidebar.js
import React from "react";
import { Tree } from "react-arborist";
import "./Sidebar.css";

const Sidebar = () => {
    const data = [
      {id: "Nav1", label: "Case Management", children: [
        {id: "Nav1-1", label: "List Cases"},
        {id: "Nav1-2", label: "Registration"},
      ]},
      {id: "Nav2", label: "Estimation Management"},
      {id: "Nav3", label: "Propertie Management"}
    ];
    return (
      <div className="sidebar">
        <Tree data={data}>
          {({node, style, dragHandle}) => (
            <div style={style} ref={dragHandle}>
              {node.isLeaf ? node.data.label : `${node.data.label}`}
            </div>
          )}
        </Tree>
      </div>
    );
};
export default Sidebar;